Biomarkers with absolute values:

#We need a FC matrix that contains only the data from Vorinostat-treated celllines:
UntreatedVorinostatcolumns <- grep(pattern = "vorinostat",colnames(Untreated))
TreatedVorinostatcolumns <- grep(pattern = "vorinostat",colnames(Treated))

UntreatedVorinostat <- Untreated[,UntreatedVorinostatcolumns]
TreatedVorinostat <- Treated[,TreatedVorinostatcolumns]

FCVorinostat <- TreatedVorinostat - UntreatedVorinostat


# work with mean of the rows because we only want to compare the genes:
FCVorinostatabs= abs(FCVorinostat)
FCVorinostatmean <- apply(FCVorinostatabs, 1, mean)

# sort the values to get the 100 largest values:
sortedgeneralbiomarker <- sort(FCVorinostatmean, decreasing = TRUE)
sortedgeneralbiomarker <- as.matrix(sortedgeneralbiomarker)

#select the top 100 general biomarkers:
top100generalbiomarkers = sortedgeneralbiomarker[1:100,]
top100generalbiomarkers <- as.matrix(top100generalbiomarkers)

#create vector with gene names:
generalbiomarkergenes = row.names(top100generalbiomarkers)

Gene Ontology analysis, more plots and information, but inconclusive

library(clusterProfiler)
## 
## clusterProfiler v3.10.1  For help: https://guangchuangyu.github.io/software/clusterProfiler
## 
## If you use clusterProfiler in published research, please cite:
## Guangchuang Yu, Li-Gen Wang, Yanyan Han, Qing-Yu He. clusterProfiler: an R package for comparing biological themes among gene clusters. OMICS: A Journal of Integrative Biology. 2012, 16(5):284-287.
library(org.Hs.eg.db)
## Loading required package: AnnotationDbi
## Loading required package: stats4
## Loading required package: BiocGenerics
## Loading required package: parallel
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
## 
##     clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
##     clusterExport, clusterMap, parApply, parCapply, parLapply,
##     parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     Filter, Find, Map, Position, Reduce, anyDuplicated, append,
##     as.data.frame, basename, cbind, colMeans, colSums, colnames,
##     dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
##     intersect, is.unsorted, lapply, lengths, mapply, match, mget,
##     order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
##     rowMeans, rowSums, rownames, sapply, setdiff, sort, table,
##     tapply, union, unique, unsplit, which, which.max, which.min
## Loading required package: Biobase
## Welcome to Bioconductor
## 
##     Vignettes contain introductory material; view with
##     'browseVignettes()'. To cite Bioconductor, see
##     'citation("Biobase")', and for packages 'citation("pkgname")'.
## Loading required package: IRanges
## Loading required package: S4Vectors
## 
## Attaching package: 'S4Vectors'
## The following object is masked from 'package:base':
## 
##     expand.grid
## 
# do the translation 
# index 2 because already done analysis with biomarkers from p.values 

translated.genes2= bitr(generalbiomarkergenes,fromType="SYMBOL", toType="ENTREZID",OrgDb = org.Hs.eg.db) 
## 'select()' returned 1:1 mapping between keys and columns
## Warning in bitr(generalbiomarkergenes, fromType = "SYMBOL", toType =
## "ENTREZID", : 10% of input gene IDs are fail to map...
head(translated.genes2)
##     SYMBOL ENTREZID
## 1    DHRS2    10202
## 2     ABAT       18
## 3 SERPINI1     5274
## 6      CLU     1191
## 7     STC1     6781
## 8      NMI     9111
#################################################################################################################

#### Gene Ontology Classification
# Notes: BP for Biological Process, MF for Molecular Function, and CC for Cellular Component

library(DOSE)
## Warning: package 'DOSE' was built under R version 3.5.2
## DOSE v3.8.2  For help: https://guangchuangyu.github.io/DOSE
## 
## If you use DOSE in published research, please cite:
## Guangchuang Yu, Li-Gen Wang, Guang-Rong Yan, Qing-Yu He. DOSE: an R/Bioconductor package for Disease Ontology Semantic and Enrichment analysis. Bioinformatics 2015, 31(4):608-609
# take the needed gene ID
gene2=translated.genes2$ENTREZID
head(gene2)
## [1] "10202" "18"    "5274"  "1191"  "6781"  "9111"
### do classification

## 1. Biological Process
ggo2.1 <- groupGO(gene= gene2, OrgDb = org.Hs.eg.db,  ont = "BP", level = 3, readable = FALSE)
head(summary(ggo2.1))
## Warning in summary(ggo2.1): summary method to convert the object to
## data.frame is deprecated, please use as.data.frame instead.
##                    ID                              Description Count
## GO:0019953 GO:0019953                      sexual reproduction     4
## GO:0019954 GO:0019954                     asexual reproduction     0
## GO:0022414 GO:0022414                     reproductive process     9
## GO:0032504 GO:0032504      multicellular organism reproduction     4
## GO:0032505 GO:0032505 reproduction of a single-celled organism     0
## GO:0061887 GO:0061887         reproduction of symbiont in host     0
##            GeneRatio                                    geneID
## GO:0019953      4/90                          18/8061/330/8900
## GO:0019954      0/90                                          
## GO:0022414      9/90 18/6781/374/8644/8061/2353/330/10370/8900
## GO:0032504      4/90                        6781/8061/330/8900
## GO:0032505      0/90                                          
## GO:0061887      0/90
# visualization 
barplot(ggo2.1, drop=TRUE, showCategory=12)

## 2. Molecular Function
ggo2.2 <- groupGO(gene= gene2, OrgDb = org.Hs.eg.db,  ont = "MF", level = 3, readable = FALSE)
head(summary(ggo2.2))
## Warning in summary(ggo2.2): summary method to convert the object to
## data.frame is deprecated, please use as.data.frame instead.
##                    ID
## GO:0001070 GO:0001070
## GO:0001072 GO:0001072
## GO:0001073 GO:0001073
## GO:0001134 GO:0001134
## GO:0003700 GO:0003700
## GO:0003711 GO:0003711
##                                                           Description
## GO:0001070               RNA-binding transcription regulator activity
## GO:0001072 transcription antitermination factor activity, RNA binding
## GO:0001073 transcription antitermination factor activity, DNA binding
## GO:0001134                transcription regulator recruiting activity
## GO:0003700                  DNA-binding transcription factor activity
## GO:0003711                transcription elongation regulator activity
##            Count GeneRatio
## GO:0001070     0      0/90
## GO:0001072     0      0/90
## GO:0001073     0      0/90
## GO:0001134     0      0/90
## GO:0003700    10     10/90
## GO:0003711     0      0/90
##                                                        geneID
## GO:0001070                                                   
## GO:0001072                                                   
## GO:0001073                                                   
## GO:0001134                                                   
## GO:0003700 8091/8061/2353/4790/10370/2969/2305/467/7157/23635
## GO:0003711
# visualization 
barplot(ggo2.2, drop=TRUE, showCategory=12)

## 3. Cellular Component
ggo2.3 <- groupGO(gene= gene2, OrgDb = org.Hs.eg.db,  ont = "CC", level = 3, readable = FALSE)
head(summary(ggo2.3))
## Warning in summary(ggo2.3): summary method to convert the object to
## data.frame is deprecated, please use as.data.frame instead.
##                    ID                    Description Count GeneRatio
## GO:0005886 GO:0005886                plasma membrane    26     26/90
## GO:0005628 GO:0005628              prospore membrane     0      0/90
## GO:0005789 GO:0005789 endoplasmic reticulum membrane     4      4/90
## GO:0019867 GO:0019867                 outer membrane     1      1/90
## GO:0031090 GO:0031090             organelle membrane    17     17/90
## GO:0034357 GO:0034357        photosynthetic membrane     0      0/90
##                                                                                                                                               geneID
## GO:0005886 6781/57030/8744/55256/4758/79850/360/1490/5168/23208/7205/11151/8061/6515/80328/4900/10486/8829/1368/55915/6253/306/27131/27340/2014/4804
## GO:0005628                                                                                                                                          
## GO:0005789                                                                                                                        374/9526/6253/2281
## GO:0019867                                                                                                                                       637
## GO:0031090                                                  1191/374/57030/7298/4758/4001/23208/11151/51131/6515/4900/64921/57134/306/27131/637/2281
## GO:0034357
# visualization 
barplot(ggo2.3, drop=TRUE, showCategory=12)

#################################################################################################################

### enrich GO 

# only works with gene id ENSEMBL 

library(org.Hs.eg.db)

# create gene data frame ans translate it 

gene.df2 <- bitr(generalbiomarkergenes, fromType = "SYMBOL",
                toType = c("ENSEMBL", "ENTREZID"),
                OrgDb = org.Hs.eg.db)
## 'select()' returned 1:many mapping between keys and columns
## Warning in bitr(generalbiomarkergenes, fromType = "SYMBOL", toType =
## c("ENSEMBL", : 10% of input gene IDs are fail to map...
##############################################################################################################
### Cellular Component
ego2.1 <- enrichGO(gene         = gene.df2$ENSEMBL,
                 OrgDb         = org.Hs.eg.db,
                 keyType       = 'ENSEMBL',
                 ont           = "CC",
                 pAdjustMethod = "BH",
                 pvalueCutoff  = 0.01,
                 qvalueCutoff  = 0.05)

head(summary(ego2.1))
## Warning in summary(ego2.1): summary method to convert the object to
## data.frame is deprecated, please use as.data.frame instead.
##                    ID               Description GeneRatio   BgRatio
## GO:0035580 GO:0035580    specific granule lumen      9/99  83/21794
## GO:0042581 GO:0042581          specific granule     11/99 213/21794
## GO:0034774 GO:0034774   secretory granule lumen     13/99 374/21794
## GO:0060205 GO:0060205 cytoplasmic vesicle lumen     13/99 392/21794
## GO:0031983 GO:0031983             vesicle lumen     13/99 393/21794
## GO:0043202 GO:0043202           lysosomal lumen      8/99 111/21794
##                  pvalue     p.adjust       qvalue
## GO:0035580 1.415185e-10 3.240774e-08 2.785680e-08
## GO:0042581 3.565349e-09 4.082325e-07 3.509054e-07
## GO:0034774 1.486233e-08 1.134491e-06 9.751775e-07
## GO:0060205 2.586890e-08 1.220798e-06 1.049364e-06
## GO:0031983 2.665498e-08 1.220798e-06 1.049364e-06
## GO:0043202 4.087960e-08 1.560238e-06 1.341138e-06
##                                                                                                                                                                                                                     geneID
## GO:0035580                                                                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957/ENSG00000109320
## GO:0042581                                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957/ENSG00000109320/ENSG00000059804/ENSG00000138772
## GO:0034774 ENSG00000163536/ENSG00000120885/ENSG00000103196/ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957/ENSG00000109320/ENSG00000109107
## GO:0060205 ENSG00000163536/ENSG00000120885/ENSG00000103196/ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957/ENSG00000109320/ENSG00000109107
## GO:0031983 ENSG00000163536/ENSG00000120885/ENSG00000103196/ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957/ENSG00000109320/ENSG00000109107
## GO:0043202                                                                                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
##            Count
## GO:0035580     9
## GO:0042581    11
## GO:0034774    13
## GO:0060205    13
## GO:0031983    13
## GO:0043202     8
# visualization 
#dotplot(ego2.1, showCategory=3)
cnetplot(ego2.1)

emapplot(ego2.1)

##############################################################################################################

### Biological Process
ego2.2 <- enrichGO(gene         = gene.df2$ENSEMBL,
                 OrgDb         = org.Hs.eg.db,
                 keyType       = 'ENSEMBL',
                 ont           = "BP",
                 pAdjustMethod = "BH",
                 pvalueCutoff  = 0.01,
                 qvalueCutoff  = 0.05)

head(summary(ego2.2))
## Warning in summary(ego2.2): summary method to convert the object to
## data.frame is deprecated, please use as.data.frame instead.
##                    ID                         Description GeneRatio
## GO:0006689 GO:0006689       ganglioside catabolic process      8/95
## GO:0009313 GO:0009313   oligosaccharide catabolic process      8/95
## GO:0046479 GO:0046479 glycosphingolipid catabolic process      8/95
## GO:0019377 GO:0019377        glycolipid catabolic process      8/95
## GO:0046514 GO:0046514          ceramide catabolic process      8/95
## GO:0001573 GO:0001573       ganglioside metabolic process      8/95
##             BgRatio       pvalue     p.adjust       qvalue
## GO:0006689 14/20505 4.609982e-16 1.005437e-12 8.778376e-13
## GO:0009313 22/20505 4.762652e-14 3.462448e-11 3.023031e-11
## GO:0046479 22/20505 4.762652e-14 3.462448e-11 3.023031e-11
## GO:0019377 24/20505 1.087160e-13 5.927741e-11 5.175455e-11
## GO:0046514 25/20505 1.592733e-13 6.947503e-11 6.065799e-11
## GO:0001573 30/20505 8.457689e-13 3.074370e-10 2.684204e-10
##                                                                                                                                     geneID
## GO:0006689 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0009313 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0046479 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0019377 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0046514 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0001573 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
##            Count
## GO:0006689     8
## GO:0009313     8
## GO:0046479     8
## GO:0019377     8
## GO:0046514     8
## GO:0001573     8
# visualization 
#dotplot(ego2.2, showCategory=10)
cnetplot(ego2.2)

emapplot(ego2.2)

##############################################################################################################

### Molecular Function
ego2.3 <- enrichGO(gene         = gene.df2$ENSEMBL,
                 OrgDb         = org.Hs.eg.db,
                 keyType       = 'ENSEMBL',
                 ont           = "MF",
                 pAdjustMethod = "BH",
                 pvalueCutoff  = 0.01,
                 qvalueCutoff  = 0.05)

head(summary(ego2.3))
## Warning in summary(ego2.3): summary method to convert the object to
## data.frame is deprecated, please use as.data.frame instead.
##                    ID                                          Description
## GO:0052794 GO:0052794                  exo-alpha-(2->3)-sialidase activity
## GO:0052795 GO:0052795                  exo-alpha-(2->6)-sialidase activity
## GO:0052796 GO:0052796                  exo-alpha-(2->8)-sialidase activity
## GO:0004308 GO:0004308                         exo-alpha-sialidase activity
## GO:0016997 GO:0016997                             alpha-sialidase activity
## GO:0004553 GO:0004553 hydrolase activity, hydrolyzing O-glycosyl compounds
##            GeneRatio   BgRatio       pvalue     p.adjust       qvalue
## GO:0052794      8/97  12/19626 1.291220e-16 1.480599e-14 1.377301e-14
## GO:0052795      8/97  12/19626 1.291220e-16 1.480599e-14 1.377301e-14
## GO:0052796      8/97  12/19626 1.291220e-16 1.480599e-14 1.377301e-14
## GO:0004308      8/97  14/19626 7.770352e-16 5.346002e-14 4.973025e-14
## GO:0016997      8/97  14/19626 7.770352e-16 5.346002e-14 4.973025e-14
## GO:0004553      9/97 105/19626 2.450757e-09 1.405101e-07 1.307071e-07
##                                                                                                                                                     geneID
## GO:0052794                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0052795                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0052796                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0004308                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0016997                 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957
## GO:0004553 ENSG00000204386/ENSG00000227315/ENSG00000234343/ENSG00000234846/ENSG00000227129/ENSG00000184494/ENSG00000228691/ENSG00000223957/ENSG00000117643
##            Count
## GO:0052794     8
## GO:0052795     8
## GO:0052796     8
## GO:0004308     8
## GO:0016997     8
## GO:0004553     9
# visualization 
#dotplot(ego2.3, showCategory=10)
cnetplot(ego2.3)

emapplot(ego2.3)

Enrichment with “enrichPathway”:

library(ReactomePA)
## ReactomePA v1.26.0  For help: https://guangchuangyu.github.io/ReactomePA
## 
## If you use ReactomePA in published research, please cite:
## Guangchuang Yu, Qing-Yu He. ReactomePA: an R/Bioconductor package for reactome pathway analysis and visualization. Molecular BioSystems 2016, 12(2):477-479
# biomarkers
gene.df <- bitr(generalbiomarkergenes, fromType = "SYMBOL",
                toType = c("ENSEMBL", "ENTREZID"),
                OrgDb = org.Hs.eg.db)
## 'select()' returned 1:many mapping between keys and columns
## Warning in bitr(generalbiomarkergenes, fromType = "SYMBOL", toType =
## c("ENSEMBL", : 10% of input gene IDs are fail to map...
x <- enrichPathway(gene=gene.df$ENTREZID, pvalueCutoff = 0.05, readable = T )
head(as.data.frame(x))
##                          ID
## R-HSA-2559586 R-HSA-2559586
## R-HSA-2559583 R-HSA-2559583
## R-HSA-2262752 R-HSA-2262752
## R-HSA-2559582 R-HSA-2559582
## R-HSA-2559584 R-HSA-2559584
## R-HSA-8852276 R-HSA-8852276
##                                                                  Description
## R-HSA-2559586                  DNA Damage/Telomere Stress Induced Senescence
## R-HSA-2559583                                            Cellular Senescence
## R-HSA-2262752                                   Cellular responses to stress
## R-HSA-2559582               Senescence-Associated Secretory Phenotype (SASP)
## R-HSA-2559584 Formation of Senescence-Associated Heterochromatin Foci (SAHF)
## R-HSA-8852276      The role of GTSE1 in G2/M progression after G2 checkpoint
##               GeneRatio   BgRatio       pvalue     p.adjust       qvalue
## R-HSA-2559586     10/60  80/10554 1.948831e-11 9.140019e-09 6.482428e-09
## R-HSA-2559583     12/60 195/10554 7.268531e-10 1.704471e-07 1.208872e-07
## R-HSA-2262752     16/60 426/10554 1.096103e-09 1.713575e-07 1.215328e-07
## R-HSA-2559582      8/60 110/10554 1.757728e-07 2.060936e-05 1.461689e-05
## R-HSA-2559584      4/60  16/10554 1.632265e-06 1.531064e-04 1.085886e-04
## R-HSA-8852276      6/60  75/10554 3.883378e-06 3.035507e-04 2.152890e-04
##                                                                                                                            geneID
## R-HSA-2559586                                       HIST1H1C/HMGA2/HIST1H2BD/LMNB1/HIST2H2BE/HIST1H4H/CCNA1/TP53/HIST1H2AE/CDKN1A
## R-HSA-2559583                             HIST1H1C/HMGA2/HIST1H2BD/LMNB1/HIST2H2BE/FOS/NFKB1/HIST1H4H/CCNA1/TP53/HIST1H2AE/CDKN1A
## R-HSA-2262752 HIST1H1C/TUBB2B/HMGA2/HIST1H2BD/LMNB1/HIST2H2BE/FOS/NFKB1/PSMB10/CITED2/HIST1H4H/CCNA1/TP53/TUBB4A/HIST1H2AE/CDKN1A
## R-HSA-2559582                                                       HIST1H2BD/HIST2H2BE/FOS/NFKB1/HIST1H4H/CCNA1/HIST1H2AE/CDKN1A
## R-HSA-2559584                                                                                           HIST1H1C/HMGA2/LMNB1/TP53
## R-HSA-8852276                                                                              TUBB2B/PSMB10/GTSE1/TP53/TUBB4A/CDKN1A
##               Count
## R-HSA-2559586    10
## R-HSA-2559583    12
## R-HSA-2262752    16
## R-HSA-2559582     8
## R-HSA-2559584     4
## R-HSA-8852276     6
# visualization
barplot(x,showCategory=12)

dotplot(x, showCategory=12)

cnetplot(x,categorySize="geneNum")

emapplot(x)

library(KEGG.db)
## 
## KEGG.db contains mappings based on older data because the original
##   resource was removed from the the public domain before the most
##   recent update was produced. This package should now be
##   considered deprecated and future versions of Bioconductor may
##   not have it available.  Users who want more current data are
##   encouraged to look at the KEGGREST or reactome.db packages
library(org.Hs.eg.db)
library(enrichplot)
gene.df <- bitr(generalbiomarkergenes, fromType = "SYMBOL",
                toType = c("ENSEMBL", "ENTREZID"),
                OrgDb = org.Hs.eg.db)
## 'select()' returned 1:many mapping between keys and columns
## Warning in bitr(generalbiomarkergenes, fromType = "SYMBOL", toType =
## c("ENSEMBL", : 10% of input gene IDs are fail to map...
kk <- enrichKEGG(gene=gene.df$ENTREZID,pvalueCutoff = 0.05,pAdjustMethod = "none")
head(summary(kk))
## Warning in summary(kk): summary method to convert the object to data.frame
## is deprecated, please use as.data.frame instead.
##                ID                             Description GeneRatio
## hsa05202 hsa05202 Transcriptional misregulation in cancer      8/49
## hsa04210 hsa04210                               Apoptosis      6/49
## hsa05203 hsa05203                    Viral carcinogenesis      7/49
## hsa05166 hsa05166 Human T-cell leukemia virus 1 infection      7/49
## hsa05161 hsa05161                             Hepatitis B      6/49
## hsa04115 hsa04115                   p53 signaling pathway      4/49
##           BgRatio       pvalue     p.adjust      qvalue
## hsa05202 186/7867 1.652177e-05 1.652177e-05 0.002191308
## hsa04210 136/7867 1.814709e-04 1.814709e-04 0.009781510
## hsa05203 201/7867 2.212484e-04 2.212484e-04 0.009781510
## hsa05166 219/7867 3.737403e-04 3.737403e-04 0.012392443
## hsa05161 163/7867 4.827212e-04 4.827212e-04 0.012804814
## hsa04115  72/7867 1.001411e-03 1.001411e-03 0.018012898
##                                          geneID Count
## hsa05202 8091/4790/330/4291/8900/7157/1026/4804     8
## hsa04210            4001/2353/4790/330/7157/637     6
## hsa05203     3017/8349/4790/8365/8900/7157/1026     7
## hsa05166     8061/2353/4790/8829/8900/7157/1026     7
## hsa05161           2353/4790/8900/7157/1026/637     6
## hsa04115                    51512/7157/1026/637     4
# visualization

# FC
library(enrichplot)
library(DOSE)
top100generalbiomarkers=as.data.frame(top100generalbiomarkers)
colnames(top100generalbiomarkers)[1] <- "fold Change"
top100generalbiomarkers=cbind(top100generalbiomarkers,generalbiomarkergenes)
colnames(top100generalbiomarkers)[2] <- "genes"

FC <- top100generalbiomarkers$`fold Change`
names(FC) <- gene.df$ENTREZID

barplot(kk,showCategory=100)

dotplot(kk, showCategory=100)

cnetplot(kk,categorySize="geneNum",foldChange = FC)

cnetplot(kk,categorySize="geneNum",circular=TRUE)

emapplot(kk)

heatplot(kk,foldChange = FC)

upsetplot(kk)

# path 
library(pathview)
## Warning: package 'pathview' was built under R version 3.5.2
## ##############################################################################
## Pathview is an open source software package distributed under GNU General
## Public License version 3 (GPLv3). Details of GPLv3 is available at
## http://www.gnu.org/licenses/gpl-3.0.html. Particullary, users are required to
## formally cite the original Pathview paper (not just mention it) in publications
## or products. For details, do citation("pathview") within R.
## 
## The pathview downloads and uses KEGG data. Non-academic uses may require a KEGG
## license agreement (details at http://www.kegg.jp/kegg/legal.html).
## ##############################################################################
pathview(gene.data = FC, 
         pathway.id = "hsa05202", 
         species = "hsa", 
         limit = list(gene=5, cpd=1))
## 'select()' returned 1:1 mapping between keys and columns
## Info: Working in directory /Users/laura.plutowski/Desktop/Uni/4.Semester/projekt/project-02-group-05/Pathways
## Info: Writing image file hsa05202.pathview.png